package com.cloud.mall.sms.service;

import com.cloud.mall.api.CommonPage;
import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.sms.dto.SmsFlashPromotionSessionDetail;
import com.cloud.mall.sms.input.SmsFlashPromotionInpDTO;
import com.cloud.mall.sms.input.SmsFlashPromotionSessionInpDTO;
import com.cloud.mall.sms.out.SmsFlashPromotionOut;
import com.cloud.mall.sms.out.SmsFlashPromotionSessionOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.List;

@Api(tags = "限时购场次管理")
@RequestMapping("/flashSession")
public interface SmsFlashPromotionSessionService {


    @ApiOperation("添加场次")
    @PostMapping("/create")
    BaseResponse create(@RequestBody SmsFlashPromotionSessionInpDTO smsFlashPromotionSessionInpDTO);

    @ApiOperation("修改场次")
    @PostMapping("/update/{id}")
    BaseResponse update(@PathVariable Long id,
                        @RequestBody SmsFlashPromotionSessionInpDTO smsFlashPromotionSessionInpDTO);

    @ApiOperation("删除场次")
    @PostMapping("/delete/{id}")
    BaseResponse delete(@PathVariable Long id);

    @ApiOperation("修改启用状态")
    @PostMapping("/update/status/{id}")
    BaseResponse update(@PathVariable Long id, @RequestParam Integer status);

    @ApiOperation("获取场次详情")
    @GetMapping("/{id}")
    BaseResponse<SmsFlashPromotionSessionOut> getItem(@PathVariable Long id);

    @ApiOperation("获取全部场次")
    @GetMapping("/list")
    BaseResponse<List<SmsFlashPromotionSessionOut>> list();

    @ApiOperation("获取全部可选场次及其数量")
    @GetMapping("/selectList")
    BaseResponse<List<SmsFlashPromotionSessionDetail>> selectList(Long flashPromotionId);


}
